CLS
INPUT "vvedite n"; n: u$ = "01"
FOR i = 2 TO n
b = i: f = 0: c$ = ""
DO
c$ = MID$(u$, (b MOD 2) + 1, 1) + c$: b = b \ 2
LOOP UNTIL b = 0
FOR j = 1 TO LEN(c$) / 2
IF MID$(c$, j, 1) = MID$(c$, LEN(c$) - j + 1, 1) THEN f = f + 1
NEXT
IF f = LEN(c$) \ 2 THEN PRINT i; CHR$(179);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )